GXSetShapeVector
You can use theGXSetShapeVector
function to change the geometry of an existing shape.
void GXSetShapeVector(gxShape target, const Fixed vector[]);
target
- A reference to the shape whose geometry you want to change.
data
- An array of fixed-point values to use as the new geometry.
DESCRIPTION
TheGXSetShapeVector
function replaces the geometry of thetarget
shape with a new geometry, which it creates by traversing thevector
array. The length of thevector
array that you supply depends on shape type of thetarget
shape; for example, if thetarget
shape is a point, you should provide a vector array with twoFixed
values; if thetarget
shape is a line, you should provide fourFixed
values, and so on.Although this function creates a copy of the default shape, it does not create a copy of the default shape's style, ink, or transform. The new shape returned by this function contains references to same style, ink, and transform as the default shape. You can change the style using functions from Chapter 3, "Geometric Styles," and you can change the style, ink, and transform using functions from Inside Macintosh: QuickDraw GX Objects.
You may pass any number of values in the
vector
array; theGXNewShapeVector
function traverses this array as necessary to initialize the new shape's geometry. If you pass too few values in this parameter, the function posts the warningextra_data_passed_was_ignored
.If you specify a shape type that is not one of the geometric shape types, this function performs the actions described in the following table:
Shape type Action taken bitmap Sets the target shape to be a bitmap shape; expects the vector array to contain values corresponding to the fields of a bitmap structure picture Sets the target shape to be a picture shape with no overriding styles, inks, or transforms; expects the vector array to contain an array of shape references text Posts the error graphic_type_does_not_contain_points
glyph Posts the error graphic_type_does_not_contain_points
layout Posts the error graphic_type_does_not_contain_points
ERRORS, WARNINGS, AND NOTICES
Errors out_of_memory shape_is_nil parameter_is_nil number_of_points_exceeds_implementation_limit number_of_contours_exceeds_implementation_limit size_of_polygon_exceeds_implementation_limit size_of_path_exceeds_implementation_limit illegal_type_for_shape (debugging version) count_is_less_than_one (debugging version) shape_access_not_allowed (debugging version) graphic_type_does_not_contain_points (debugging version) Warnings extra_data_passed_was_ignored SEE ALSO
For general information about each type of geometry, see "About Geometric Shapes" on page 2-5. For specific definitions of each type of geometry, see the section "Data Types" beginning on page 2-104.For information about related functions, see the descriptions of the
GXSetPoint
,GXSetLine
,GXSetCurve
,GXSetRectangle
,GXSetPolygons
, andGXSetPaths
functions on page 2-122 through page 2-135.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help